﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SoundServant.Controls
{
    /// <summary>
    /// Interaction logic for CDControl.xaml
    /// </summary>
    public partial class CDControl : UserControl
    {
        CD cd;

        public CDControl(CD _cd)
        {
            InitializeComponent();

            cd = _cd;

            Draw();
        }

        void Draw()
        {
            RecordingDateTime.Content = cd.Disc.Recording.Date.ToString("ddd d MMMM yyyy HH:mm");
            Title.Content = cd.Disc.Recording.Title;
            Type.Content = SS.FullMeetingType(cd.Disc.Recording.Type);
            Info.Content = SS.ParseTimeSpan(cd.Disc.Recording.Length) + " | " + cd.Disc.Recording.Discs.Count + " Discs | " + cd.Disc.Recording.NumOfTracks + " Tracks | MP3 (" + (cd.Disc.Recording.Mp3File.Length / 1048576).ToString("0.00") + "Mb)";
        }
    }
}
